{% extends 'blog/base.html' %}
{% block css %}
    <link rel="stylesheet" href="/static/css/shop.css">
    <script type="text/javascript" src="static/js/jquery.js"></script>
    <script type="text/javascript" src="static/js/add.js" ></script>
{% endblock %}

{% block showActive1%}
back-heigh
{% endblock %}

{% block content %}
    <div class="contain">
        <div class="title">
            <div class="text">
                商品列表
            </div>
        </div>
        <table>
            <tr>
                <th>分类</th>
                <th>名称</th>
                <th>单价(元)</th>
                <th>单位</th>
                <th></th>
            </tr>
           <div id="goods">
            {% for post in posts %}
                <tr>
                    <td> {{ post.sort}}</td>
                    <td>{{ post.name}}</td>
                    <td>{{ post.price }}</td>
                    <td>{{ post.unit }}</td>
                    <td><button class="car" id={{post.id}}>加入购物车</button></td>
                </tr>
            {% endfor %}
           </div>
        </table>
    </div>

{% endblock %}